<?php
namespace lib\src;

class loading{
	//str loading
	protected static $loading = array(
										"loading      ",
										"loading.",
										"loading..",
										"loading...",
										"loading....",
										"loading.....",
										"loading......",
									  );
	/**
	 * loading
	 */
	public static function loading($frequency = 1){
		while(true){
			foreach(self::$loading as $key=>$val){
				echo $val."\r";
				sleep($frequency);
			}
		}
	}
}
?>